<?php

use Phinx\Migration\AbstractMigration;

class AddColumnLevelInResourceTable extends AbstractMigration
{
    public function up()
    {
        $this->table("resource")
            ->addColumn("level", "integer", ['default' => 0, 'limit' => 2, 'comment' => '等级'])
            ->save();
    }

    public function down()
    {
        $this->table("resource")
            ->removeColumn("level")
            ->save();
    }
}
